// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import axios from "axios";
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
// import layer from 'vue-layer'
// import 'vue-layer/lib/vue-layer.css';
import layer from "layui-layer";
import App from './App'
import router from './router'
import store from './store/index.js'
import Vuex from 'vuex'
Vue.use(Vuex)
import Header from '@/components/Header'
import BottomFooder from '@/components/BottomFooder'
import Person from '@/components/Person'
import Dynamic from '@/components/Dynamic'
import Online from '@/components/Online'
import Visitor from '@/components/Visitor'
import Mydynamic from '@/components/Mydynamic'
import ComplaintReport from '@/components/ComplaintReport'
import PaymentMethod from '@/components/PaymentMethod'
// import './styles/global.css'
import NanoDialog from '@/components/dilaog'
//网页头部导航组件直接使用
Vue.component('NanoDialog', NanoDialog)
Vue.component('headers', Header)
    //网页底部组件直接使用
Vue.component('bottom-fooder', BottomFooder)
    //人物主页组件
Vue.component('persons', Person)
    //个人主页的动态组件
Vue.component('dynamics', Dynamic)
    // 在线online 组件Online
Vue.component('onlines', Online)
    //访客组件 和 点赞我的 和我的点赞公用
Vue.component('visitors', Visitor)
    //我的动态
Vue.component('my-dynamics', Mydynamic)
    // 投诉举报的弹框全局组件
Vue.component('IllegalReporting', ComplaintReport)

//全局支付方式弹框
Vue.component('PayMethods', PaymentMethod)
    //全局配置图片懒加载vue-lazyload 已安装
import VueLazyload from 'vue-lazyload'
Vue.use(VueLazyload)
    // 配置项
    // Vue.use(VueLazyload, {
    // preLoad: 1.3,
    // error: 'dist/error.png',
    // loading: 'dist/loading.gif',
    // attempt: 1
    // })
    //和路由懒加载require import
    //设置语言翻译
import { translationMain } from "./language/translation.js";
Vue.prototype.$translationMain = translationMain //八种语言翻译
    //获取星座方法


// main.js
// Vue.prototype.$EventBus = new Vue()
Vue.config.productionTip = false
    // Vue.prototype.$layer = layer(Vue);
Vue.use(ElementUI);
// Vue.prototype.$layer = layer(Vue, {
// msgtime: 3, //目前只有一项，即msg方法的默认消失时间，单位：秒
// });
/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    components: { App },
    template: '<App/>'
})